Optimal. Leaf size=132 \[ -\frac {a (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a (d \cos (e+f x))^{1+n} \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+n) \sqrt {\sin ^2(e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 132, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4310, 16, 2827,
2722} \begin {gather*} -\frac {a \sin (e+f x) (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {n+2}{2};\cos ^2(e+f x)\right )}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a \sin (e+f x) (d \cos (e+f x))^{n+1} \, _2F_1\left (\frac {1}{2},\frac {n+1}{2};\frac {n+3}{2};\cos ^2(e+f x)\right )}{d f (n+1) \sqrt {\sin ^2(e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 2722
Rule 2827
Rule 4310
Rubi steps
\begin {align*} \int (d \cos (e+f x))^n (a+a \sec (e+f x)) \, dx &=\int (d \cos (e+f x))^n (a+a \cos (e+f x)) \sec (e+f x) \, dx\\ &=d \int (d \cos (e+f x))^{-1+n} (a+a \cos (e+f x)) \, dx\\ &=a \int (d \cos (e+f x))^n \, dx+(a d) \int (d \cos (e+f x))^{-1+n} \, dx\\ &=-\frac {a (d \cos (e+f x))^n \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{f n \sqrt {\sin ^2(e+f x)}}-\frac {a (d \cos (e+f x))^{1+n} \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right ) \sin (e+f x)}{d f (1+n) \sqrt {\sin ^2(e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 105, normalized size = 0.80 \begin {gather*} -\frac {a (d \cos (e+f x))^n \left ((1+n) \csc (e+f x) \, _2F_1\left (\frac {1}{2},\frac {n}{2};\frac {2+n}{2};\cos ^2(e+f x)\right )+n \cot (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1+n}{2};\frac {3+n}{2};\cos ^2(e+f x)\right )\right ) \sqrt {\sin ^2(e+f x)}}{f n (1+n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.10, size = 0, normalized size = 0.00 \[\int \left (d \cos \left (f x +e \right )\right )^{n} \left (a +a \sec \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int \left (d \cos {\left (e + f x \right )}\right )^{n}\, dx + \int \left (d \cos {\left (e + f x \right )}\right )^{n} \sec {\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (d\,\cos \left (e+f\,x\right )\right )}^n\,\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right ) \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________